<template>
  <view class="legal-notice">
    <view class="notice-item" v-if="legalData?.status">
      <uni-icons type="paperclip" size="18" />
      <text>{{ legalData.status }}</text>
    </view>

    <view class="notice-item" v-if="legalData?.requirements">
      <uni-icons type="info" size="18" />
      <text>{{ legalData.requirements }}</text>
    </view>

    <view class="notice-item" v-if="legalData?.restrictions">
      <uni-icons type="alert" size="18" />
      <text>{{ legalData.restrictions }}</text>
    </view>
  </view>
</template>

<script>
  export default {
    name: "legal-notice",
    props: {
      data: {
        type: Object,
        default: () => ({
          status: '',
          requirements: '',
          restrictions: ''
        })
      }
    },
    computed: {
      legalData() {
        return this.data || {
          status: '',
          requirements: '',
          restrictions: ''
        }
      }
    }
  }
</script>

<style lang="scss">
  .legal-notice {
    padding: 20rpx;
    background: #fff;
    
    .notice-item {
      display: flex;
      align-items: center;
      margin-bottom: 20rpx;
      color: #666;
      font-size: 28rpx;
      
      .uni-icons {
        margin-right: 10rpx;
        color: #5cb85c;
      }
    }
  }
</style>